home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Controls
/
Visual Basic Controls.iso
/
vbcontrol
/
csfilesc
/
filesamp.frm
< prev
next >
Wrap
Text File
|
1998-10-08
|
5KB
|
159 lines
VERSION 5.00
Object = "{FDB5C7D6-5D15-11D1-A5CA-682504C10E27}#2.1#0"; "CSFILE.OCX"
Begin VB.Form frmFileToolSample
Caption = "FileTool Sample"
ClientHeight = 4590
ClientLeft = 5490
ClientTop = 3390
ClientWidth = 4710
LinkTopic = "Form1"
ScaleHeight = 4590
ScaleWidth = 4710
Begin VB.Frame Frame3
Caption = "SaveFile Dialog"
Height = 855
Left = 180
TabIndex = 9
Top = 3300
Width = 4395
Begin VB.TextBox txtSave
Height = 315
Left = 1020
TabIndex = 11
Top = 300
Width = 3255
End
Begin VB.CommandButton cmdSave
Caption = "Save"
Height = 315
Left = 120
TabIndex = 10
Top = 300
Width = 795
End
End
Begin VB.Frame Frame2
Caption = "BrowseForFile Dialog"
Height = 855
Left = 120
TabIndex = 6
Top = 300
Width = 4455
Begin VB.TextBox txtSelectFile
Height = 315
Left = 120
TabIndex = 8
Top = 300
Width = 3735
End
Begin VB.CommandButton cmdSelectFile
Caption = "..."
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 3900
TabIndex = 7
Top = 300
Width = 375
End
End
Begin VB.Frame Frame1
Caption = "BrowseForFolder Dialog and SearchFile"
Height = 1695
Left = 120
TabIndex = 0
Top = 1380
Width = 4455
Begin VB.CommandButton cmdSelectPath
Caption = "..."
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 3900
TabIndex = 4
Top = 300
Width = 375
End
Begin VB.TextBox txtSelectPath
Height = 315
Left = 120
TabIndex = 3
Top = 300
Width = 3735
End
Begin VB.TextBox txtSearchFile
Height = 315
Left = 120
TabIndex = 2
Top = 1020
Width = 3315
End
Begin VB.CommandButton cmdSearchFile
Caption = "Search"
Height = 315
Left = 3480
TabIndex = 1
Top = 1020
Width = 795
End
Begin VB.Label Label3
Caption = "Enter a file to find and click Search"
Height = 255
Left = 180
TabIndex = 5
Top = 780
Width = 3315
End
End
Begin CSFile.FileTool FileTool1
Left = 240
Top = 4200
_ExtentX = 635
_ExtentY = 582
End
End
Attribute VB_Name = "frmFileToolSample"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdSearchFile_Click()
Dim p As String
Dim f As String
Dim b As String
p = txtSelectPath.Text & IIf(Right(txtSelectPath.Text, 1) = "\", "", "\")
f = txtSearchFile.Text
b = p & f
If FileTool1.Exists(b) = False Then
MsgBox "File not found", , "File not found"
Else
MsgBox b, , "File exists"
End If
End Sub
Private Sub cmdSelectFile_Click()
txtSelectFile = FileTool1.SelectFile
End Sub
Private Sub cmdSelectPath_Click()
txtSelectPath = FileTool1.SelectPath
End Sub
Private Sub CmdSave_Click()
txtSave = FileTool1.SelectSave
End Sub